<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
	content="multipart/form-data; charset=utf-8">
<title>用户修改页面</title>
</head>
<body>
	<form
		action="${pageContext.request.contextPath }/user/update.action"
		method="post" enctype="multipart/form-data">
		<input type="hidden" name="u_id" value="${user.u_id }">
		<table border="1" align="center">
			<tr align="center">
				<td align="center" colspan="2"><select name="d_id">
						<c:forEach var="dept" items="${ depts }">
							<option value="${ dept.d_id }" ${ user.dept.d_id==dept.d_id?"selected":"" }>${ dept.d_name }</option>
						</c:forEach>
				</select></td>
			</tr>
			<tr align="center">
				<td>姓名:</td>
				<td><input type="text" name="u_name" value="${user.u_name }"></td>
			</tr>
			<tr align="center">
				<td>年龄:</td>
				<td><input type="text" name="u_age" value="${user.u_age }"></td>
			</tr>
			<tr align="center">
				<td>电话:</td>
				<td><input type="text" name="u_tel" value="${user.u_tel }"></td>
			</tr>
			<tr align="center">
				<td>图片:</td>
				<td><input type="file" name="photo"><img
					src="${pageContext.request.contextPath }/${user.u_img }"
					height="50" width="50"></td>
			</tr>
			<tr align="center">
				<td align="center" colspan="2"><input type="submit" value="修改">
					<a href="${pageContext.request.contextPath }/user/find.action"><input
						type="button" value="返回"></a></td>
			</tr>
		</table>
		<input type="hidden" name="u_img" value="${user.u_img }">
	</form>
</body>
</html>